Return to doc.sitecore.com

Valid for Sitecore 5.3, 5.2
.NET 2.0 and Client Side Validation
Prev

Sitecore versions: tested with 5.2.0.3. 

As opposed to .NET 1.1, .NET 2.0 does not rely on ready-made .js files in the aspnet_client folder in order to make client side validation. 

Instead, the files are made run-time. .NET 2.0 does this by adding a reference to a webresource.axd file in the root of the web site.

The .js is generated by this axd so that it matches the browser and the controls on the page. The reference can look like this: 

    /WebResource.axd?d=v2zu1x_e9XWGPplypDt89w2&t=632745541192187789 

In order for this to work with Sitecore 5.2, you must add the WebResource.axd to the IgnoreUrlPrefixes in the web.config:  

<setting name="IgnoreUrlPrefixes" value="/trace.axd|/sitecore/shell/Editor|/sitecore/admin/ upgrade/|UnhandledException.html|/WebResource.axd" /> 

The setting will be set as standard in future versions of Sitecore. In the current version, you should set it yourself; otherwise, you will get a "WebForm_PostBackOptions is undefined" error on pages using validators.


Prev